Four Issues as of 13-Jan-05

I. Data out put controller units don't much, (ex. In accel control feedback still showing (mm) in oscilloscope)

Answer:  This broke because Hugh commented out the code in CON MainPanel method update that polls TBL for a change in dimension, then updates the units of DOC, as follows:

METHOD update IS
VAR	dim
BEGIN
	IF NOT attached THEN
		RETURN
	END IF

	! check TBL for a change in engineering units as a result of a
	! control mode change and update DOC with the new units
	!
	! From Hugh: We just can't do this because the #dimension message
	! may occur while the TBL is going down, causing a CON crash.
	!
	! IF vmTBL THEN
	!	IF node.connected[hostNodeTBL]
	!	AND node.connected[dspNodeTBL] THEN
	!	dim := vmTBL.dimension
	!	IF dim <> dimension THEN
	!		self.updateTBLtoDOC
	!	END IF
	!	dimension := dim
	! END IF
END METHOD

He says because of the continual polling, the chance is high for TBL to go away in the time interval
from the execution of the IF clause to the IF body, causing CON to crash.  He says it would be better
if instead of polling, TBL tells CON of a dimension change.  The possibility of a crash would still
exist, but would be greatly reduced.  This is a major change in architecture, because it is the only
instance of a subsidiary controller initiating network contact.

Changes:

1) Add ivar "updateDimension" to CON MainPanel.

2) Change CON MainPanel method update to:

METHOD update IS
BEGIN
	IF updateDimension THEN
		self.updateTBLtoDOC
		updateDimension := NIL
	END IF
END METHOD

3) Add to CON MainPanel the method changeDimension:

METHOD changeDimension IS
	Called by TBL MainPanel method setDimension when the user
	changes the control dimension, pass new control units on to DOC.
BEGIN
	updateDimension := TRUE
END METHOD

4) Add to the end of TBL MainPanel method updateUnits:

	system.changeDimension

5) Add method to TBL MySystemTBL:

METHOD changeDimension IS
	Notify CON that a change of control dimension has occurred so it can
	download new units to DOC.  Called by MainPanel method updateUnits.
VAR	mainCON
BEGIN
	IF NOT self.isSimulation THEN
		IF NOT node.connected[hostNodeCON] THEN
			node.downlink[hostNodeCON].connect.restore
		END IF
		IF node.connected[hostNodeCON] THEN
			mainCON := node.lookup[hostNodeCON, 'mainP']
			IF mainCON THEN
				mainCON.changeDimension
			END IF
		END IF
	END IF
END METHOD


II. Add synchronize Dataout put controller run button, when we hit the run button from table controller. 

Answer:  Triggering the data recorder externally is not supported by the architecture.


III. We sometimes couldn't save the setting file with error message. 

Answer:  can't replicate.  Possibly the system was in a strange state due to networking problems?


IV. In external analog mode, when transition from MHI RUn to stop occurs, digital meters are cleared, which causes an inconvenient loss of min and max data displays.

Answer:  Can do nothing about this, due to unfortunate MHI-designed protocol for using external range bits to reset the external analog logic state.  MainPanel method update does the following, with the Panel.forAll[#updateUnits] causing the panels to clear.

	! update external analog program state logic
	IF vm.program = externPgm THEN

		! respond to changes in extern range bit changes
		IF NOT vm.running THEN
			
			! update extern range bits and change gain range
			IF dio.updateExternRange THEN

				! update external reference range and units
				vm.updateExternRange
				Panel.forAll[#updateUnits]

				! respond to external reference range reset
				IF dio.externRangeReset THEN
					dio.runEnDO.clear
				ELSE
					dio.runEnDO.setValue[self.runOkay[TRUE]]
				END IF
			END IF
		END IF

		! respond to program preview and run requests from MHI
		IF dio.runRequest THEN
			IF dio.runEnDO.value THEN
				run.setValue[dio.runRequest]
			END IF
		END IF
	ELSE
		dio.runEnDO.clear
